<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/1/16 0016
 * Time: 12:48
 */

namespace app\home\controller;


use think\Controller;
use think\Db;

class Index extends Controller
{
    //首页
    public function index()
    {
        $db=Db::table('store_company_profile_food')->where('id',1)->find();
        $this->assign('data',$db);


        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);
        return $this->fetch();
    }
    //联系
    public function Contact()
    {
        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);
        return $this->fetch();
    }

    //
    public function about()
    {
        //责任
        $db=Db::table('store_duty')->select();
        $this->assign('data',$db);
        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);
        return $this->fetch();
    }

    //食材
    public function food()
    {


        $db=Db::table('store_food_material')->select();
//        dump($db);die;
        $this->assign('data',$db);


        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);
        return $this->fetch();
    }

    //产品
    public function serve()
    {

        //热卖商品
        $db=Db::table('store_popular_hot')->select();
        $this->assign('data',$db);


        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);

        return $this->fetch();
    }

    public function products2()
    {
        //伴侣
        $db=Db::table('store_grain_partner')->select();
        $this->assign('data',$db);

        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);
        return $this->fetch();
    }

    public function products5()
    {
            //五谷专研
            $db=Db::table('store_specialize')->select();
            $this->assign('data',$db);

        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);
        return $this->fetch();
    }

    public function products6()
    {

            //热卖商品
            $db=Db::table('store_moldbaby')->select();
            $this->assign('data',$db);

        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);
        return $this->fetch();


    }

    //研发
    public function research()
    {
        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);
        return $this->fetch();
    }

    //公司简介
    public function company()
    {
        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);
        return $this->fetch();
    }


    //加入我们
    public function culture()
    {
        //轮播图
        $db=Db::table('store_banner')->select();
        $this->assign('data1',$db);
        return $this->fetch();
    }

    //招聘
    public function recruit()
    {
        //轮播图
        $db=Db::table('store_banner')->select();
//            halt($db);
        $this->assign('data1',$db);
        return $this->fetch();
    }


}